package com.hc.commView;

import java.awt.BorderLayout;
import java.awt.Image;

import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;

import com.hc.bean.DeviceBean;
import com.hc.window.ImagePanel;

public class InfoPanel extends JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private static JLabel idLabel;
	private static JLabel stationLabel;
	private static JLabel orgLabel;
	private static JLabel timeLabel;
	private static JLabel nameLabel;

	public InfoPanel(){
		this.setLayout(new BorderLayout());
		setOpaque(false);
		
		JPanel labelPanel = new JPanel();
		labelPanel.setOpaque(false);
		labelPanel.setLayout(new BoxLayout(labelPanel, BoxLayout.Y_AXIS));
		
		JLabel lblNewLabel_2 = new JLabel(" \u7EC8\u7AEF\u540D\u79F0\uFF1A");
		labelPanel.add(lblNewLabel_2);
		
		JLabel lblNewLabel_4 = new JLabel(" \u7EC8\u7AEF\u4EE3\u53F7\uFF1A");
		labelPanel.add(lblNewLabel_4);
		
		JLabel lblNewLabel_3 = new JLabel(" \u7EC8\u7AEF\u5B9A\u4F4D\uFF1A");
		labelPanel.add(lblNewLabel_3);
		
		add(labelPanel, BorderLayout.WEST);		
		
		JLabel label_6 = new JLabel(" \u91C7\u6837\u65F6\u95F4\uFF1A");
		labelPanel.add(label_6);
		
		JLabel label_7 = new JLabel(" \u6240\u5C5E\u533A\u57DF\uFF1A");
		labelPanel.add(label_7);
		
		JPanel panel_2 = new JPanel();
		panel_2.setOpaque(false);
		panel_2.setLayout(new BoxLayout(panel_2, BoxLayout.Y_AXIS));
		add(panel_2, BorderLayout.EAST);
		
		nameLabel = new JLabel();
		panel_2.add(nameLabel);
		
		idLabel = new JLabel();
		panel_2.add(idLabel);
		
		stationLabel = new JLabel();
		panel_2.add(stationLabel);
		
		timeLabel = new JLabel();
		panel_2.add(timeLabel);
		
		orgLabel = new JLabel();
		panel_2.add(orgLabel);
		
		
		JPanel nPanel = new JPanel();
		nPanel.setOpaque(false);
		add(nPanel, BorderLayout.SOUTH);
	}
	
	public static void refresh(DeviceBean bean){
		nameLabel.setText("δ֪");
		idLabel.setText(bean.getDeviceId());
		stationLabel.setText("δ֪");
		timeLabel.setText("δ֪");
		orgLabel.setText("δ֪");
	}
}
